<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/12/13
 * Time: 8:45
 */
namespace app\portal\controller;
use cmf\controller\HomeBaseController;

use think\Db;

class VoluntShowController extends HomeBaseController
{
    //文章列表
    public function index(){
        if(request()->isAjax()){
            $type_id=input('type_id');
            $list=get_list($type_id);
            return json(['list'=>$list,'page'=>$list->render()]);
        }else{
            $list_1 = get_list(13);
            $list_2 = get_list(14);
            $list_3 = get_list(15);
            $list_4 = get_list(16);
            $list_5 = get_list(17);
            $this->assign('list_1', $list_1);
            $this->assign('list_2', $list_2);
            $this->assign('list_3', $list_3);
            $this->assign('list_4', $list_4);
            $this->assign('list_5', $list_5);
            return $this->fetch(':voluntShow');
        }
    }
}